package com.jinmdz.fmis.api.admin.controller;

import com.jinmdz.fmis.api.admin.service.BusinessSystemService;
import com.jinmdz.fmis.api.base.BaseController;
import com.jinmdz.fmis.core.base.BaseResult;
import com.jinmdz.fmis.dao.admin.model.businesssystem.BusinessSystemListItem;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;

/**
 * 业务系统信息维护相关接口
 *
 * @author LiCongLu
 * @date 2020-03-18 11:05
 */
@Api(description = "业务系统信息维护相关接口")
@RestController()
@RequestMapping("/admin/business-system")
public class BusinessSystemController extends BaseController {

    @Resource
    private BusinessSystemService businessSystemService;

    /**
     * 根据查询条件加载表【business_system】中保存的业务系统数据
     *
     * @param
     * @return
     * @author LiCongLu
     * @date 2020-03-18 11:06
     */
    @ApiOperation(value = "根据查询条件加载表【business_system】中保存的业务系统数据", notes = "根据查询条件加载表【business_system】中保存的业务系统数据")
    @PostMapping("/load-business-system-list")
    public BaseResult<ArrayList<BusinessSystemListItem>> loadBusinessSystemList() {
        return resultHandler(userItem -> businessSystemService.loadBusinessSystemList());
    }
}
